﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcApplication.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewData["Message"] = "Welcome to ASP.NET MVC!";

            return View();
        }
        [AcceptVerbs(HttpVerbs.Post)]
        [ValidateAntiForgeryToken]
        public ActionResult About()
        {
            ViewData["About"] = "Who care???!!!";

            Creator creator = new Creator();
            creator.Name = "John Green";
            creator.Gender = "Male";
            creator.Birthday = new DateTime(1993, 8, 9);
            ViewData.Model = creator;

            return View();
        }

        [ValidateInput(true)]
        public ActionResult Validate(string name)
        {
            return View();
        }

        [NonAction]
        public void Create()
        { 
        }
    }
}
